package com.sq.partner.manager.service.impl;

import com.sq.partner.manager.dao.CommissionDao;
import com.sq.partner.manager.mybatis.model.ZJYDCommApplication;
import com.sq.partner.manager.mybatis.model.ZJYDCommPolicy;
import com.sq.partner.manager.service.CommissionService;
import com.sq.partner.manager.util.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.SQLException;
import java.util.Map;

@Service
public class CommissionServiceImpl implements CommissionService {

    @Autowired
    private CommissionDao commissionDao;

    @Override
    public Page<ZJYDCommApplication> queryApplicationPage(Map map) throws Exception {
        return commissionDao.queryApplicationPage(map);
    }

    @Override
    public Page queryPolicyPageByApplyId(Page page) throws Exception {
        return commissionDao.queryPolicyPageByApplyId(page);
    }

    @Override
    public String downloadNotApply(String applyId) throws Exception {
        return commissionDao.downloadNotApply(applyId);
    }

    @Override
    public ZJYDCommPolicy queryToCheck(String policyId) throws Exception {
        return commissionDao.queryToCheck(policyId);
    }

    @Override
    public void saveCheckPolicy(ZJYDCommPolicy zjydCommPolicy) throws Exception {
        commissionDao.saveCheckPolicy(zjydCommPolicy);
    }

    @Override
    public String downloadApply(String applyId) throws SQLException {
        return commissionDao.downloadApply(applyId);
    }
}
